package com.gemserk.infraestructure.lwjglmavenizer

class LWJGLSourcesGenerator {
	
	public File generateSources(File baseDir){
		File generatedFile = new File(baseDir,"lwjgl-sources.jar")
		ZipUtils zutils = new ZipUtils()
		def zos
		try{
			zos = zutils.createZipFile(generatedFile.getAbsolutePath())
			zutils.zipFromDir(new File(baseDir,"src/generated").getAbsolutePath(), zos)
			zutils.zipFromDir(new File(baseDir,"src/java").getAbsolutePath(), zos)
			
		} finally {
			if(zos)
				zos.close()
		}
		
		return generatedFile
	}
}
